;(function(){

  
  // var pos = document.querySelector('.pos');
  // pos.style.bottom = -pos.offsetWidth + 29 + "px";

  var comment = document.forms[1];
  comment.onsubmit = function(e){
    // e.preventDefault()
    var odd = document.querySelector('[name="odd_num"]')
    var content = document.querySelector('[name="content"]')
    var oddReg = /^\d{11}$/;
    var checkOdd = !!odd.value.match(oddReg)
    if(!checkOdd){
      toast('请输入正确的订单号')
    }
    if (!content.value.trim()) {
      var time = !checkOdd ? 1000 : 0
      setTimeout(() => {
        toast("请输入留言内容")
      }, time);
    }
    return checkOdd && !!content.value.trim(); 
  }
  
  
})()